*********************************************************************** 
9/13/18: ADDED 2017
12/18/17: ADDED 2015 & 2016
10/28/15: ADDED 2014
1/22/13: CREATED FOR MIKE MURTO SO HE CAN IMPUTE UTILITIES FOR THOSE WHO
				 INCLUDE UTIITES IN RENT

***********************************************************************;
OPTIONS NOLABEL; 

LIBNAME alldat '~/jim/data';

filename mtab801 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0003-Data.txt.gz';
filename mtab802 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0007-Data.txt.gz';
filename mtab803 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0011-Data.txt.gz';
filename mtab804 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0015-Data.txt.gz';
 
filename mtab811 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0019-Data.txt.gz';
filename mtab812 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0023-Data.txt.gz';
filename mtab813 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0027-Data.txt.gz';
filename mtab814 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0031-Data.txt.gz';
filename mtab815 pipe 'gunzip -c ~/jim/data/ce_mtab/1980_81/08423-0035-Data.txt.gz';

filename mtab841 pipe 'gunzip -c ~/jim/data/ce_mtab/1984/08671-0003-Data.txt.gz';
filename mtab842 pipe 'gunzip -c ~/jim/data/ce_mtab/1984/08671-0007-Data.txt.gz';
filename mtab843 pipe 'gunzip -c ~/jim/data/ce_mtab/1984/08671-0011-Data.txt.gz';
filename mtab844 pipe 'gunzip -c ~/jim/data/ce_mtab/1984/08671-0015-Data.txt.gz';
 
filename mtab851 pipe 'gunzip -c ~/jim/data/ce_mtab/1985/08904-0003-Data.txt.gz';
filename mtab852 pipe 'gunzip -c ~/jim/data/ce_mtab/1985/08904-0007-Data.txt.gz';
filename mtab853 pipe 'gunzip -c ~/jim/data/ce_mtab/1985/08904-0011-Data.txt.gz';
filename mtab854 pipe 'gunzip -c ~/jim/data/ce_mtab/1985/08904-0015-Data.txt.gz';
filename mtab855 pipe 'gunzip -c ~/jim/data/ce_mtab/1985/08904-0019-Data.txt.gz';
 
filename mtab861 pipe 'gunzip -c ~/jim/data/ce_mtab/1986/09113-0003-Data.txt.gz';
filename mtab862 pipe 'gunzip -c ~/jim/data/ce_mtab/1986/09113-0007-Data.txt.gz';
filename mtab863 pipe 'gunzip -c ~/jim/data/ce_mtab/1986/09113-0011-Data.txt.gz';
filename mtab864 pipe 'gunzip -c ~/jim/data/ce_mtab/1986/09113-0015-Data.txt.gz';
 
filename mtab871 pipe 'gunzip -c ~/jim/data/ce_mtab/1987/09332-0003-Data.txt.gz';
filename mtab872 pipe 'gunzip -c ~/jim/data/ce_mtab/1987/09332-0007-Data.txt.gz';
filename mtab873 pipe 'gunzip -c ~/jim/data/ce_mtab/1987/09332-0011-Data.txt.gz';
filename mtab874 pipe 'gunzip -c ~/jim/data/ce_mtab/1987/09332-0015-Data.txt.gz';

filename mtab881 pipe 'gunzip -c ~/jim/data/ce_mtab/1988/09451-0003-Data.txt.gz';
filename mtab882 pipe 'gunzip -c ~/jim/data/ce_mtab/1988/09451-0007-Data.txt.gz';
filename mtab883 pipe 'gunzip -c ~/jim/data/ce_mtab/1988/09451-0011-Data.txt.gz';
filename mtab884 pipe 'gunzip -c ~/jim/data/ce_mtab/1988/09451-0015-Data.txt.gz';
 
filename mtab891 pipe 'gunzip -c ~/jim/data/ce_mtab/1989/09712-0003-Data.txt.gz';
filename mtab892 pipe 'gunzip -c ~/jim/data/ce_mtab/1989/09712-0007-Data.txt.gz';
filename mtab893 pipe 'gunzip -c ~/jim/data/ce_mtab/1989/09712-0011-Data.txt.gz';
filename mtab894 pipe 'gunzip -c ~/jim/data/ce_mtab/1989/09712-0015-Data.txt.gz';
 
filename mtab901 pipe 'gunzip -c ~/jim/data/ce_mtab/1990/09820-0003-Data.txt.gz';
filename mtab902 pipe 'gunzip -c ~/jim/data/ce_mtab/1990/09820-0007-Data.txt.gz';
filename mtab903 pipe 'gunzip -c ~/jim/data/ce_mtab/1990/09820-0011-Data.txt.gz';
filename mtab904 pipe 'gunzip -c ~/jim/data/ce_mtab/1990/09820-0015-Data.txt.gz';
 
filename mtab911 pipe 'gunzip -c ~/jim/data/ce_mtab/1991/06209-0003-Data.txt.gz';
filename mtab912 pipe 'gunzip -c ~/jim/data/ce_mtab/1991/06209-0007-Data.txt.gz';
filename mtab913 pipe 'gunzip -c ~/jim/data/ce_mtab/1991/06209-0011-Data.txt.gz';
filename mtab914 pipe 'gunzip -c ~/jim/data/ce_mtab/1991/06209-0015-Data.txt.gz';

filename mtab921 pipe 'gunzip -c ~/jim/data/ce_mtab/1992/06372-0003-Data.txt.gz';
filename mtab922 pipe 'gunzip -c ~/jim/data/ce_mtab/1992/06372-0007-Data.txt.gz';
filename mtab923 pipe 'gunzip -c ~/jim/data/ce_mtab/1992/06372-0011-Data.txt.gz';
filename mtab924 pipe 'gunzip -c ~/jim/data/ce_mtab/1992/06372-0015-Data.txt.gz';
 
filename mtab931 pipe 'gunzip -c ~/jim/data/ce_mtab/1993/da6580.mtab.q931.gz';   
filename mtab932 pipe 'gunzip -c ~/jim/data/ce_mtab/1993/da6580.mtab.q932.gz';   
filename mtab933 pipe 'gunzip -c ~/jim/data/ce_mtab/1993/da6580.mtab.q933.gz';   
filename mtab934 pipe 'gunzip -c ~/jim/data/ce_mtab/1993/da6580.mtab.q934.gz';      
 
filename mtab941 pipe 'gunzip -c ~/jim/data/ce_mtab/1994/da6710.mtab.q941.gz';      
filename mtab942 pipe 'gunzip -c ~/jim/data/ce_mtab/1994/da6710.mtab.q942.gz';      
filename mtab943 pipe 'gunzip -c ~/jim/data/ce_mtab/1994/da6710.mtab.q943.gz';   
filename mtab944 pipe 'gunzip -c ~/jim/data/ce_mtab/1994/da6710.mtab.q944.gz';      
 
filename mtab951 pipe 'gunzip -c ~/jim/data/ce_mtab/1995/da2264.mtab.q951.gz';      
filename mtab952 pipe 'gunzip -c ~/jim/data/ce_mtab/1995/da2264.mtab.q952.gz';      
filename mtab953 pipe 'gunzip -c ~/jim/data/ce_mtab/1995/da2264.mtab.q953.gz';      
filename mtab954 pipe 'gunzip -c ~/jim/data/ce_mtab/1995/da2264.mtab.q954.gz';   
filename mtab955 pipe 'gunzip -c ~/jim/data/ce_mtab/1995/da2264.mtab.q955.gz';
 
filename mtab961 pipe 'gunzip -c ~/jim/data/ce_mtab/1996/02794-0003-Data.txt.gz';
filename mtab962 pipe 'gunzip -c ~/jim/data/ce_mtab/1996/02794-0007-Data.txt.gz';
filename mtab963 pipe 'gunzip -c ~/jim/data/ce_mtab/1996/02794-0011-Data.txt.gz';
filename mtab964 pipe 'gunzip -c ~/jim/data/ce_mtab/1996/02794-0015-Data.txt.gz';
 
filename mtab971 pipe 'gunzip -c ~/jim/data/ce_mtab/1997/mtabi971X.txt.gz';      
filename mtab972 pipe 'gunzip -c ~/jim/data/ce_mtab/1997/mtabi972.txt.gz'; 
filename mtab973 pipe 'gunzip -c ~/jim/data/ce_mtab/1997/mtabi973.txt.gz'; 
filename mtab974 pipe 'gunzip -c ~/jim/data/ce_mtab/1997/mtabi974.txt.gz';
 
filename mtab981 pipe 'gunzip -c ~/jim/data/ce_mtab/1998/da2971.mtab981.gz';     
filename mtab982 pipe 'gunzip -c ~/jim/data/ce_mtab/1998/da2971.mtab982.gz';     
filename mtab983 pipe 'gunzip -c ~/jim/data/ce_mtab/1998/da2971.mtab983.gz';     
filename mtab984 pipe 'gunzip -c ~/jim/data/ce_mtab/1998/da2971.mtab984.gz';

filename mtab991 pipe 'gunzip -c ~/jim/data/ce_mtab/1999/da3228.mtab991.gz';
filename mtab992 pipe 'gunzip -c ~/jim/data/ce_mtab/1999/da3228.mtab992.gz'; 
filename mtab993 pipe 'gunzip -c ~/jim/data/ce_mtab/1999/da3228.mtab993.gz'; 
filename mtab994 pipe 'gunzip -c ~/jim/data/ce_mtab/1999/da3228.mtab994.gz'; 
 
filename mtab1001 pipe 'gunzip -c ~/jim/data/ce_mtab/2000/da3396.mtab001.gz';
filename mtab1002 pipe 'gunzip -c ~/jim/data/ce_mtab/2000/da3396.mtab002.gz';     
filename mtab1003 pipe 'gunzip -c ~/jim/data/ce_mtab/2000/da3396.mtab003.gz';
filename mtab1004 pipe 'gunzip -c ~/jim/data/ce_mtab/2000/da3396.mtab004.gz';
 
filename mtab1011 pipe 'gunzip -c ~/jim/data/ce_mtab/2001/da3674.mtab011.gz';
filename mtab1012 pipe 'gunzip -c ~/jim/data/ce_mtab/2001/da3674.mtab012.gz';        
filename mtab1013 pipe 'gunzip -c ~/jim/data/ce_mtab/2001/da3674.mtab013.gz';     
filename mtab1014 pipe 'gunzip -c ~/jim/data/ce_mtab/2001/da3674.mtab014.gz';
 
filename mtab1021 pipe 'gunzip -c ~/jim/data/ce_mtab/2002/03949-0003-Data.txt.gz';
filename mtab1022 pipe 'gunzip -c ~/jim/data/ce_mtab/2002/03949-0007-Data.txt.gz';
filename mtab1023 pipe 'gunzip -c ~/jim/data/ce_mtab/2002/03949-0011-Data.txt.gz';
filename mtab1024 pipe 'gunzip -c ~/jim/data/ce_mtab/2002/03949-0015-Data.txt.gz';
 
filename mtab1031 pipe 'gunzip -c ~/jim/data/ce_mtab/2003/mtabi031x.txt.gz'; 
filename mtab1032 pipe 'gunzip -c ~/jim/data/ce_mtab/2003/mtabi032.txt.gz';  
filename mtab1033 pipe 'gunzip -c ~/jim/data/ce_mtab/2003/mtabi033.txt.gz';  
filename mtab1034 pipe 'gunzip -c ~/jim/data/ce_mtab/2003/mtabi034.txt.gz';  
 
filename mtab1041 pipe 'gunzip -c ~/jim/data/ce_mtab/2004/mtabi041x.txt.gz'; 
filename mtab1042 pipe 'gunzip -c ~/jim/data/ce_mtab/2004/mtabi042.txt.gz';  
filename mtab1043 pipe 'gunzip -c ~/jim/data/ce_mtab/2004/mtabi043.txt.gz';  
filename mtab1044 pipe 'gunzip -c ~/jim/data/ce_mtab/2004/mtabi044.txt.gz';  
filename mtab1045 pipe 'gunzip -c ~/jim/data/ce_mtab/2004/mtabi051.txt.gz';  

filename mtab1051 pipe 'gunzip -c ~/jim/data/ce_mtab/2005/mtabi051x.txt.gz'; 
filename mtab1052 pipe 'gunzip -c ~/jim/data/ce_mtab/2005/mtabi052.txt.gz';  
filename mtab1053 pipe 'gunzip -c ~/jim/data/ce_mtab/2005/mtabi053.txt.gz';  
filename mtab1054 pipe 'gunzip -c ~/jim/data/ce_mtab/2005/mtabi054.txt.gz';  

filename mtab1061 pipe 'gunzip -c ~/jim/data/ce_mtab/2006/mtabi061x.txt.gz'; 
filename mtab1062 pipe 'gunzip -c ~/jim/data/ce_mtab/2006/mtabi062.txt.gz';  
filename mtab1063 pipe 'gunzip -c ~/jim/data/ce_mtab/2006/mtabi063.txt.gz';  
filename mtab1064 pipe 'gunzip -c ~/jim/data/ce_mtab/2006/mtabi064.txt.gz';  

filename mtab1071 pipe 'gunzip -c ~/jim/data/ce_mtab/2007/mtabi071x.txt.gz'; 
filename mtab1072 pipe 'gunzip -c ~/jim/data/ce_mtab/2007/mtabi072.txt.gz';  
filename mtab1073 pipe 'gunzip -c ~/jim/data/ce_mtab/2007/mtabi073.txt.gz';  
filename mtab1074 pipe 'gunzip -c ~/jim/data/ce_mtab/2007/mtabi074.txt.gz';  

filename mtab1081 pipe 'gunzip -c ~/jim/data/ce_mtab/2008/mtabi081x.txt.gz'; 
filename mtab1082 pipe 'gunzip -c ~/jim/data/ce_mtab/2008/mtabi082.txt.gz';  
filename mtab1083 pipe 'gunzip -c ~/jim/data/ce_mtab/2008/mtabi083.txt.gz';  
filename mtab1084 pipe 'gunzip -c ~/jim/data/ce_mtab/2008/mtabi084.txt.gz';  

filename mtab1091 pipe 'gunzip -c ~/jim/data/ce_mtab/2009/mtabi091x.txt.gz';
filename mtab1092 pipe 'gunzip -c ~/jim/data/ce_mtab/2009/mtabi092.txt.gz'; 
filename mtab1093 pipe 'gunzip -c ~/jim/data/ce_mtab/2009/mtabi093.txt.gz'; 
filename mtab1094 pipe 'gunzip -c ~/jim/data/ce_mtab/2009/mtabi094.txt.gz'; 

filename mtab1101 pipe 'gunzip -c ~/jim/data/ce_mtab/2010/mtabi101x.txt.gz';
filename mtab1102 pipe 'gunzip -c ~/jim/data/ce_mtab/2010/mtabi102.txt.gz'; 
filename mtab1103 pipe 'gunzip -c ~/jim/data/ce_mtab/2010/mtabi103.txt.gz'; 
filename mtab1104 pipe 'gunzip -c ~/jim/data/ce_mtab/2010/mtabi104.txt.gz'; 

***************************************************************************
* MACRO FOR SURVEY YEARS 1980-2010
***************************************************************************;
%MACRO read(qyr); 
 
  DATA exp&qyr;
   INFILE mtab&qyr ; 
   IF 801 LE &qyr LE 955 THEN INPUT newid 1-8 ucc 9-14 cost 15-26 ref_mo 30-31 ref_yr 32-33;
      ELSE IF &qyr GE 961 THEN INPUT newid 1-8 ucc 9-14 cost 15-26 ref_mo 30-31 ref_yr 32-35;

   IF ucc IN (250111 250211 250221 250901 250911 260111 260211 
   					  270101 270000 270211 270310 270411 270901);

	 IF ucc=250111 THEN oil=cost;
	    ELSE oil=0;
	 IF ucc=250211 THEN gas_tank=cost;
	    ELSE gas_tank=0;
	 IF ucc IN(250221 250901 250911) THEN oil=coal_othr;
	    ELSE coal_othr=0;
	 IF ucc=260111 THEN electric=cost;
	    ELSE electric=0;
	 IF ucc=260211 THEN nat_gas=cost;
	    ELSE nat_gas=0;
	 IF ucc IN(270101 270000) THEN telephone=cost;
	    ELSE telephone=0;
	 IF ucc=270211 THEN water=cost;
	    ELSE water=0;
	 IF ucc=270310 THEN cable=cost;
	    ELSE cable=0;
	 IF ucc=270411 THEN trash=cost;
	    ELSE trash=0;
	 IF ucc=270901 THEN septic=cost;
	    ELSE septic=0;


   qyear=&qyr; 
   IF qyear LE 855 THEN newid=9000000+newid;
	
  RUN;

PROC SORT DATA=exp&qyr; 
   BY newid;
RUN; 
PROC MEANS DATA=exp&qyr SUM NOPRINT;
     BY newid;
     ID qyear;
     VAR oil gas_tank coal_othr electric nat_gas telephone water cable trash septic;
     OUTPUT OUT=out_util&qyr(DROP=_FREQ_ _TYPE_) SUM=;
RUN;  
PROC MEANS; 
RUN; 
%MEND read; 


***************************************************************************
* MACRO FOR SURVEY YEARS 2011 AND AFTER
***************************************************************************;
%MACRO read2(qyr,ext,yr4);

  PROC IMPORT DATAFILE="~/jim/data/ce_mtab/&yr4/mtbi&ext..csv"
     OUT=mtab_dat
     DBMS=CSV
     REPLACE;
     GETNAMES=YES;
  RUN;
 
DATA mtab_dat; 
   SET mtab_dat(RENAME=(ucc=temp1 ref_mo=temp2 ref_yr=temp3 newid=temp4)); 
 
   ucc=temp1*1;   
   ref_mo=temp2*1;   
   ref_yr=temp3*1; 
   newid=temp4*1;  

   IF ucc IN (250111 250211 250221 250901 250911 260111 260211 
   					  270101 270000 270211 270310 270411 270901 270105 270106);

	 IF ucc=250111 THEN oil=cost;
	    ELSE oil=0;
	 IF ucc=250211 THEN gas_tank=cost;
	    ELSE gas_tank=0;
	 IF ucc IN(250221 250901 250911) THEN oil=coal_othr;
	    ELSE coal_othr=0;
	 IF ucc=260111 THEN electric=cost;
	    ELSE electric=0;
	 IF ucc=260211 THEN nat_gas=cost;
	    ELSE nat_gas=0;
	 IF ucc IN(270101 270000 270105 270106) THEN telephone=cost;
	    ELSE telephone=0;
	 IF ucc=270211 THEN water=cost;
	    ELSE water=0;
	 IF ucc=270310 THEN cable=cost;
	    ELSE cable=0;
	 IF ucc=270411 THEN trash=cost;
	    ELSE trash=0;
	 IF ucc=270901 THEN septic=cost;
	    ELSE septic=0;

   qyear=&qyr; 

PROC SORT DATA=mtab_dat; 
   BY newid;
RUN; 
PROC MEANS DATA=mtab_dat SUM NOPRINT;
     BY newid;
     ID qyear;
     VAR oil gas_tank coal_othr electric nat_gas telephone water cable trash septic;
     OUTPUT OUT=out_util&qyr(DROP=_FREQ_ _TYPE_) SUM=;
RUN;  
PROC MEANS; 
RUN; 

%MEND read2;


%read(801);
%read(802);
%read(803); 
%read(804);   
      
%read(811); 
%read(812); 
%read(813); 
%read(814); 
%read(815);    

%read(841);
%read(842);    
%read(843);
%read(844);
 
%read(851);
%read(852);    
%read(853); 
%read(854);   
%read(855);   
 
%read(861); 
%read(862);
%read(863);
%read(864); 

%read(871);
%read(872); 
%read(873);   
%read(874);
 
%read(881);    
%read(882); 
%read(883);
%read(884);
 
%read(891);
%read(892); 
%read(893);
%read(894);  
 
%read(901); 
%read(902);
%read(903);
%read(904); 
 
%read(911);    
%read(912); 
%read(913);   
%read(914);
 
%read(921);    
%read(922);
%read(923);
%read(924);
 
%read(931);    
%read(932); 
%read(933);   
%read(934); 

%read(941);   
%read(942); 
%read(943);  
%read(944); 
 
%read(951);
%read(952);
%read(953);
%read(954); 
%read(955); 
      
%read(961); 
%read(962);  
%read(963); 
%read(964);
 
%read(971);
%read(972);
%read(973); 
%read(974);
 
%read(981); 
%read(982);  
%read(983); 
%read(984);
 
%read(991);
%read(992);
%read(993); 
%read(994);   
      
%read(1001); 
%read(1002);  
%read(1003); 
%read(1004);

%read(1011);
%read(1012);
%read(1013); 
%read(1014);
 
%read(1021); 
%read(1022);  
%read(1023); 
%read(1024);
 
%read(1031);
%read(1032);
%read(1033); 
%read(1034);   
      
%read(1041); 
%read(1042);  
%read(1043); 
%read(1044);
%read(1045);

%read(1051); 
%read(1052);  
%read(1053); 
%read(1054);

%read(1061); 
%read(1062);  
%read(1063); 
%read(1064);

%read(1071); 
%read(1072);  
%read(1073); 
%read(1074);

%read(1081); 
%read(1082);  
%read(1083); 
%read(1084);

%read(1091);
%read(1092);
%read(1093);
%read(1094);

%read(1101);
%read(1102);
%read(1103);
%read(1104);

%read2(1111,111x,2011);
%read2(1112,112,2011);
%read2(1113,113,2011);
%read2(1114,114,2011);

%read2(1121,121x,2012);
%read2(1122,122,2012);
%read2(1123,123,2012);
%read2(1124,124,2012);

%read2(1131,131x,2013);
%read2(1132,132,2013);
%read2(1133,133,2013);
%read2(1134,134,2013);

%read2(1141,141x,2014);
%read2(1142,142,2014);
%read2(1143,143,2014);
%read2(1144,144,2014);
%read2(1145,151,2014);

%read2(1151,151x,2015);
%read2(1152,152,2015);
%read2(1153,153,2015);
%read2(1154,154,2015);

%read2(1161,161x,2016);
%read2(1162,162,2016);
%read2(1163,163,2016);
%read2(1164,164,2016);

%read2(1171,171x,2017);
%read2(1172,172,2017);
%read2(1173,173,2017);
%read2(1174,174,2017);
%read2(1175,181,2017);


DATA alldat.utilities80_17;
SET     out_util801 out_util802 out_util803 out_util804
	out_util811 out_util812 out_util813 out_util814 out_util815 
	out_util841 out_util842 out_util843 out_util844
        out_util851 out_util852 out_util853 out_util854 out_util855
        out_util861 out_util862 out_util863 out_util864
        out_util871 out_util872 out_util873 out_util874
        out_util881 out_util882 out_util883 out_util884
        out_util891 out_util892 out_util893 out_util894
        out_util901 out_util902 out_util903 out_util904
        out_util911 out_util912 out_util913 out_util914
        out_util921 out_util922 out_util923 out_util924
        out_util931 out_util932 out_util933 out_util934
        out_util941 out_util942 out_util943 out_util944
        out_util951 out_util952 out_util953 out_util954 out_util955
        out_util961 out_util962 out_util963 out_util964
        out_util971 out_util972 out_util973 out_util974
        out_util981 out_util982 out_util983 out_util984
        out_util991 out_util992 out_util993 out_util994
        out_util1001 out_util1002 out_util1003 out_util1004
        out_util1011 out_util1012 out_util1013 out_util1014
        out_util1021 out_util1022 out_util1023 out_util1024
        out_util1031 out_util1032 out_util1033 out_util1034
        out_util1041 out_util1042 out_util1043 out_util1044 out_util1045
        out_util1051 out_util1052 out_util1053 out_util1054 
        out_util1061 out_util1062 out_util1063 out_util1064
        out_util1071 out_util1072 out_util1073 out_util1074  
        out_util1081 out_util1082 out_util1083 out_util1084     
        out_util1091 out_util1092 out_util1093 out_util1094     
        out_util1101 out_util1102 out_util1103 out_util1104 
        out_util1111 out_util1112 out_util1113 out_util1114 
        out_util1121 out_util1122 out_util1123 out_util1124 
        out_util1131 out_util1132 out_util1133 out_util1134 
        out_util1141 out_util1142 out_util1143 out_util1144 out_util1145
        out_util1151 out_util1152 out_util1153 out_util1154
        out_util1161 out_util1162 out_util1163 out_util1164 
        out_util1171 out_util1172 out_util1173 out_util1174 out_util1175;     
RUN;

PROC MEANS;
RUN;

PROC SORT DATA=alldat.utilities80_17;
BY qyear;
RUN;
PROC MEANS DATA=alldat.utilities80_17;
BY qyear;
RUN;

PROC SORT DATA=alldat.utilities80_17;
BY newid;
RUN;

PROC SORT DATA=alldat.utilities80_16;
BY newid;
RUN;

PROC COMPARE BASE=alldat.utilities80_17
	     COMPARE=alldat.utilities80_16;
   WHERE qyear LE 1164;
RUN;

 
